瀏覽代碼

Changes CMake files for new folder structure

CapXilinx 12 年之前
父節點
當前提交
979b128a3d

+ 4 - 4
source/buildsupport/OpENer.cmake

@@ -22,10 +22,10 @@ endmacro(opener_platform_support ARGS)
 # Adds common Include directories     #
 ####################################### 
 macro(opener_common_includes)
-  set( SRC_DIR "${PROJECT_SOURCE_DIR}" )
-  set( CIP_SRC_DIR "${PROJECT_SOURCE_DIR}/cip" )
-  set( ENET_ENCAP_SRC_DIR "${PROJECT_SOURCE_DIR}/enet_encap" )
-  set( PORTS_SRC_DIR "${PROJECT_SOURCE_DIR}/ports")
+  set( SRC_DIR "${PROJECT_SOURCE_DIR}/src" )
+  set( CIP_SRC_DIR "${SRC_DIR}/cip" )
+  set( ENET_ENCAP_SRC_DIR "${SRC_DIR}/enet_encap" )
+  set( PORTS_SRC_DIR "${SRC_DIR}/ports")
 
   include_directories( ${PROJECT_SOURCE_DIR} ${SRC_DIR} ${CIP_SRC_DIR} ${ENET_ENCAP_SRC_DIR} ${PORTS_SRC_DIR} )
 endmacro(opener_common_includes)

+ 2 - 2
source/src/utils/CMakeLists.txt

@@ -2,6 +2,6 @@
 opener_common_includes()
 opener_platform_spec()
 
-set( UTILS_SRC random.c mtrandom.c xorshiftrandom.c)
+set( UTILS_SRC random.c xorshiftrandom.c)
 
-add_library( Utils ${UTILS_SRC} )
+add_library( Utils ${UTILS_SRC} )

+ 0 - 33
source/src/utils/mtrandom.c

@@ -1,33 +0,0 @@
-/*
- * random.c
- *
- *  Created on: Nov 28, 2013
- *      Author: mmm
- */
-
-#include "mtrandom.h"
-#include <stddef.h>
-#include <typedefs.h>
-
-typedef struct {
-	uint16_t nBlockSize;
-	uint32_t* panSeedBlocks;
-} MTRandomParams;
-
-static MTRandomParams fg_sRandomParams = {0, 0};
-
-void mtSetupRandomParams(uint16_t pa_nBlockSize)  {
-	fg_sRandomParams.nBlockSize = pa_nBlockSize;
-	fg_sRandomParams.panSeedBlocks = malloc(sizeof(uint32_t) * fg_sRandomParams.nBlockSize);
-}
-
-int mtIsInitialized(void)
-{
-	if( NULL != fg_sRandomParams.panSeedBlocks)
-		return true;
-	else return false;
-}
-
-void mtSetSeed(uint32_t pa_nStartSeed)  {
-
-}

+ 0 - 18
source/src/utils/mtrandom.h

@@ -1,18 +0,0 @@
-/*
- * random
- *
- *  Created on: Nov 28, 2013
- *      Author: mmm
- */
-
-#include <stdint.h>
-
-#ifndef RANDOM_
-#define RANDOM_
-
-void mtSetupRandomParams(uint16_t pa_nBlockSize);
-
-void mtSetSeed(uint32_t pa_nStartSeed);
-
-
-#endif /* RANDOM_ */

+ 0 - 1
source/tests/main.cpp

@@ -1,7 +1,6 @@
 #include "CppUTest/CommandLineTestRunner.h"
 
 IMPORT_TEST_GROUP(RandomClass);
-IMPORT_TEST_GROUP(MTRandomTests);
 IMPORT_TEST_GROUP(XorShiftRandom);
 
 int main(int argc, char** argv)

+ 2 - 2
source/tests/utils/CMakeLists.txt

@@ -1,8 +1,8 @@
 
 opener_common_includes()
 
-set( UtilsTestSrc randomTests.cpp MTRandomTests.cpp xorshiftrandomtests.cpp)
+set( UtilsTestSrc randomTests.cpp xorshiftrandomtests.cpp)
 
-include_directories( ${PROJECT_SOURCE_DIR}/utils )
+include_directories( ${SRC_DIR}/utils )
 
 add_library( UtilsTest ${UtilsTestSrc} )

+ 0 - 27
source/tests/utils/MTRandomTests.cpp

@@ -1,27 +0,0 @@
-#include <CppUTest/TestHarness.h>
-#include <stdint.h>
-
-extern "C"  {
-  #include "mtrandom.h"
-}
-
-TEST_GROUP(MTRandomTests)
-{
-};
-
-TEST(MTRandomTests, InitParamsTest)
-{
-	mtSetupRandomParams(10);
-	//LONGS_EQUAL(10,);
-	//if(0 == sRandomParams.panSeedBlocks) FAIL("Malloc failed to allocate memory!")
-}
-
-/*Test not correct*/
-IGNORE_TEST(MTRandomTests, SeedTest)
-{
-	mtSetupRandomParams(10);
-	mtSetSeed(0);
-	//LONGS_EQUAL(0, sRandomParams.panSeedBlocks[0]);
-	/*LONGS_EQUAL(1, naSeedBlocks[1]);*/
-}
-