CMake: custom target's flags -


how can write cmakelists.txt in way has 2 targets all (default) , test, test target has flags differ all target's flags. problem when build libraries tests need link stuff shouldn't in release build.

cmake_minimum_required(version 2.8.0) project (rootproject)  option(build_testing "build tests." off) if(build_testing)   # custom compiler option   add_definitions(-zc:wchar_t-) endif(build_testing)   add_subdirectory(lib1) add_subdirectory(lib2) add_subdirectory(lib3) add_subdirectory(lib4) add_subdirectory(bin)  if(build_testing)   # more custom compiler option tests   add_definitions(-zc:wchar_t-)    add_subdirectory(testlib1)   add_subdirectory(testlib2)   add_subdirectory(testbin)   message( status "testing folders have been added." ) endif(build_testing) 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -