From 4e79ab4ac48dd923506f7f165cbfb32e87ca2710 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Fri, 22 Dec 2017 23:21:55 +0100 Subject: Fix compiling storm_test executable Compile it really only if STORM_BUILD_TESTS is enabled and link it against compiled StormLib library instead of compiling all source files again. --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5211b1..3dbe52e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -359,9 +359,7 @@ install(TARGETS ${LIBRARY_NAME} INCLUDE(CPack) if(STORM_BUILD_TESTS) + add_executable(storm_test ${TEST_SRC_FILES}) target_link_libraries(storm_test ${LIBRARY_NAME}) - install(TARGETS storm_test DESTINATION bin) + install(TARGETS storm_test RUNTIME DESTINATION bin) endif() - -add_executable(storm_test ${SRC_FILES} ${TOMCRYPT_FILES} ${TOMMATH_FILES} ${ZLIB_BZIP2_FILES} ${TEST_SRC_FILES}) -install(TARGETS storm_test RUNTIME DESTINATION bin) -- cgit v1.2.3