![]() ![]() ![]() Set(CMAKE_C_FLAGS_RELEASEDIRECTX "/MD /O2 /Ob2 /D NDEBUG" CACHE STRING "Flags used by the C compiler during maintainer builds." FORCE) Set(CMAKE_CXX_FLAGS_RELEASEDIRECTX "/MD /O2 /Ob2 /D NDEBUG" CACHE STRING "Flags used by the C++ compiler during maintainer builds." FORCE) Set(CMAKE_SHARED_LINKER_FLAGS_DEBUGDIRECTX "/debug /INCREMENTAL" CACHE STRING "Flags used by the shared libraries linker during maintainer builds." FORCE ) Set(CMAKE_EXE_LINKER_FLAGS_DEBUGDIRECTX "/debug /INCREMENTAL" CACHE STRING "Flags used for linking binaries during maintainer builds." FORCE ) Set(CMAKE_C_FLAGS_DEBUGDIRECTX "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" CACHE STRING "Flags used by the C compiler during maintainer builds." FORCE) Set(CMAKE_CXX_FLAGS_DEBUGDIRECTX "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" CACHE STRING "Flags used by the C++ compiler during maintainer builds." FORCE) Set(CMAKE_SHARED_LINKER_FLAGS_RELEASEOPENGL "/INCREMENTAL:NO" CACHE STRING "Flags used by the shared libraries linker during maintainer builds." FORCE ) Set(CMAKE_EXE_LINKER_FLAGS_RELEASEOPENGL "/INCREMENTAL:NO" CACHE STRING "Flags used for linking binaries during maintainer builds." FORCE ) ![]() Set(CMAKE_C_FLAGS_RELEASEOPENGL "/MD /O2 /Ob2 /D NDEBUG" CACHE STRING "Flags used by the C compiler during maintainer builds." FORCE) Set(CMAKE_CXX_FLAGS_RELEASEOPENGL "/MD /O2 /Ob2 /D NDEBUG" CACHE STRING "Flags used by the C++ compiler during maintainer builds." FORCE) Set(CMAKE_SHARED_LINKER_FLAGS_DEBUGOPENGL "/debug /INCREMENTAL" CACHE STRING "Flags used by the shared libraries linker during maintainer builds." FORCE ) Set(CMAKE_EXE_LINKER_FLAGS_DEBUGOPENGL "/debug /INCREMENTAL" CACHE STRING "Flags used for linking binaries during maintainer builds." FORCE ) Set(CMAKE_C_FLAGS_DEBUGOPENGL "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" CACHE STRING "Flags used by the C compiler during maintainer builds." FORCE) Set(CMAKE_CXX_FLAGS_DEBUGOPENGL "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" CACHE STRING "Flags used by the C++ compiler during maintainer builds." FORCE) so far: cmake_minimum_required(VERSION 2.8) With DebugDirectX and ReleaseDirectx exclude the opengl files. You want add_compile_definitions().I'm setting up my visual studio project to use CMake, but I got two issues I haven't been able to solve yet.ġ How can I set a preprocessor define for Release and another for Debug?Ģ I have a project with opengl and directx so for DebugOpenGL and ReleaseOpenGL i want to exclude all directx cpp/h files from the buld. What is the correct way to use the CMake generator expressions in my case?Īdd_definitions() and remove_definitions() don't support generator expressions. However, I noticed that I am not getting the desired effect for each Debug and Release based solutions configurations profiles. Set(FLAGS_COMPILE_RELEASE "/Ox /Ob2 /Oi /Ot /GF /Zc:wchar_t /MT /WX")Īdd_compile_options($:$>) set(FLAGS_COMPILE_DEBUG "/MTd /Od /Zi /RTC1 /Zc:wchar_t /GS /WX") Please notice that I set some variables (FLAGS_COMPILE_DEBUG, DEFS_COMPILE_DEBUG, LINKER_OPTIONS_DEBUG, FLAGS_COMPILE_RELEASE, DEFS_COMPILE_RELEASE and LINKER_OPTIONS_RELEASE) containing all the specific flags for each Debug and Release based solutions configurations profiles. In the Windows based projects, I am interested in generating MSVC based solutions that have these four profiles configurations: (Debug, Release, RelWithDebInfo and MinSizeRel). I am working on a project that uses CMake to generate an multi-platform based C++ projects that need to be compiled in both Windows and Linux platforms. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |