Skip to content

Ninja error cl D8016 #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
donarturo11 opened this issue Mar 18, 2025 · 0 comments
Open

Ninja error cl D8016 #149

donarturo11 opened this issue Mar 18, 2025 · 0 comments

Comments

@donarturo11
Copy link
Contributor

donarturo11 commented Mar 18, 2025

Steps to reproduce

  1. Run Developer Command Prompt for VS2022 or load vcvars64.bat under cmd.
  2. Type cmake -GNinja -S stk -B stk-build -DBUILD_STATIC=0 -DBUILD_SHARED=1 -DCMAKE_BUILD_TYPE=Release
  3. Type cmake --build stk-build

Expected result: compile
Given result: Command line error D8016: '/clr' and '/EHs' command-line options are incompatible.

Proposed solution:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9af3227..210c73e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,6 @@ SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Release"
 "Debug" "RelWithD
 message("Build type: " ${CMAKE_BUILD_TYPE})

 if(MSVC)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /clr")
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /DNDEBUG")
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7 /Ob0 /Od /RTC1 /D_I
TERATOR_DEBUG_LEVEL=2 /D_STK_DEBUG_ /D__RTAUDIO_DEBUG__ /D__RTMIDI_DEBUG__")
 else()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant