Bläddra i källkod

Move tests folder into engine ad re-enable tests, hopefully we can stop polluting Device to make tests

Daniele Bartolini 12 år sedan
förälder
incheckning
43ec318723

+ 2 - 7
CMakeLists.txt

@@ -8,7 +8,7 @@ set (CROWN_VERSION_MICRO 9)
 
 option (CROWN_BUILD_SAMPLES "Whether to build the samples" ON)
 option (CROWN_BUILD_TOOLS "Whether to build the tools" ON)
-option (CROWN_BUILD_TESTS "Whether to build unit tests" OFF)
+option (CROWN_BUILD_TESTS "Whether to build unit tests" ON)
 
 # always debug mode for now
 set (CROWN_DEBUG 1)
@@ -29,12 +29,7 @@ add_subdirectory(engine)
 if (CROWN_BUILD_TOOLS)
 	add_subdirectory(tools)
 endif (CROWN_BUILD_TOOLS)
+
 if (CROWN_BUILD_SAMPLES)
 	add_subdirectory(samples)
 endif (CROWN_BUILD_SAMPLES)
-
-if (CROWN_BUILD_TESTS)
-	add_subdirectory(tests)
-endif (CROWN_BUILD_TESTS)
-
-

+ 5 - 1
engine/CMakeLists.txt

@@ -395,7 +395,7 @@ if (LINUX)
 		-g
 		-pg
 		-fPIC
-		-fvisibility=hidden
+		#-fvisibility=hidden
 	)
 
 	set (CROWN_EXECUTABLE_NAME crown-linux)
@@ -516,6 +516,10 @@ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:$ORIGIN")
 add_executable(${CROWN_EXECUTABLE_NAME} ${CROWN_MAIN_SRC})
 target_link_libraries(${CROWN_EXECUTABLE_NAME} crown)
 
+if (CROWN_BUILD_TESTS)
+	add_subdirectory(tests)
+endif (CROWN_BUILD_TESTS)
+
 install (TARGETS crown DESTINATION bin)
 install (TARGETS ${CROWN_EXECUTABLE_NAME} DESTINATION bin)
 

+ 0 - 2
tests/CMakeLists.txt → engine/tests/CMakeLists.txt

@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 2.8)
 
 project(crown-tests)
 
-link_directories(${CROWN_BINARY_DIR})
-
 enable_testing()
 
 add_executable(allocators allocators.cpp)

+ 0 - 0
tests/allocators.cpp → engine/tests/allocators.cpp


+ 1 - 1
tests/compressors.cpp → engine/tests/compressors.cpp

@@ -5,7 +5,7 @@
 
 using namespace crown;
 
-int main(int argc, char** argv)
+int main()
 {
 	
 	HeapAllocator allocator;

+ 0 - 0
tests/containers.cpp → engine/tests/containers.cpp


+ 0 - 0
tests/messages.cpp → engine/tests/messages.cpp


+ 0 - 0
tests/paths.cpp → engine/tests/paths.cpp


+ 0 - 0
tests/strings.cpp → engine/tests/strings.cpp