Browse Source

CMake: Allow x64 clang-cl builds in CLion

v6.1.6
reuk 3 years ago
parent
commit
abfcdc9a7e
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      extras/Build/juceaide/CMakeLists.txt

+ 10
- 1
extras/Build/juceaide/CMakeLists.txt View File

@@ -53,10 +53,18 @@ else()
# environment variables, which is unfortunate because we really don't want to cross-compile # environment variables, which is unfortunate because we really don't want to cross-compile
# juceaide. If you really want to set the compilers for juceaide, pass the appropriate # juceaide. If you really want to set the compilers for juceaide, pass the appropriate
# CMAKE_<lang>_COMPILER flags when configuring CMake. # CMAKE_<lang>_COMPILER flags when configuring CMake.
if((CMAKE_SYSTEM_NAME STREQUAL "Android") OR (CMAKE_SYSTEM_NAME STREQUAL "iOS"))
if(CMAKE_CROSSCOMPILING)
unset(ENV{ASM}) unset(ENV{ASM})
unset(ENV{CC}) unset(ENV{CC})
unset(ENV{CXX}) unset(ENV{CXX})
else()
# When building with clang-cl in Clion on Windows for an x64 target, the ABI detection phase
# of the inner build can fail unless we pass through these flags too
set(extra_configure_flags
"-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}"
"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}"
"-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}"
"-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}")
endif() endif()


message(STATUS "Configuring juceaide") message(STATUS "Configuring juceaide")
@@ -70,6 +78,7 @@ else()
"-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_BUILD_TYPE=Debug"
"-DJUCE_BUILD_HELPER_TOOLS=ON" "-DJUCE_BUILD_HELPER_TOOLS=ON"
"-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
${extra_configure_flags}
WORKING_DIRECTORY "${JUCE_SOURCE_DIR}" WORKING_DIRECTORY "${JUCE_SOURCE_DIR}"
OUTPUT_VARIABLE command_output OUTPUT_VARIABLE command_output
ERROR_VARIABLE command_output ERROR_VARIABLE command_output


Loading…
Cancel
Save