-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
Simplified example:
top-level CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(FindWDK_IssueTest)
add_compile_options("/MP")
add_subdirectory(Exe)
add_subdirectory(Sys)Exe CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(FindWDK_IssueTest_Exe)
add_executable(FindWDK_IssueTest_Exe Main.cpp)Sys CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(FindWDK_IssueTest_Sys)
find_package(WDK REQUIRED)
wdk_add_driver(FindWDK_IssueTest_Sys Main.cpp)So, I added a compile option /MP to the top-level CMakeLists.txt and want it to work on all subdirectories.
But when I open the generated solution, I see that the compile option only applies to the project Exe and not both.


Of course, there is a workaround:
top-level CMakeLists.txt:
set(MY_GLOBAL_COMPILE_OPTIONS "/MP")
add_compile_options(${MY_GLOBAL_COMPILE_OPTIONS})Sys CMakeLists.txt:
wdk_add_driver(FindWDK_IssueTest_Sys Main.cpp)
target_compile_options(FindWDK_IssueTest_Sys PRIVATE ${MY_GLOBAL_COMPILE_OPTIONS})It works, but obviously not so elegantly.
I personally think this is a bug. So, I was wondering if it is possible for FindWDK to keep global compile options that are safe for driver projects?
Thanks in advance!
Metadata
Metadata
Assignees
Labels
No labels