📝 remove -fPIC if using MSVC
This commit is contained in:
parent
04097341ac
commit
030a3ad920
|
@ -9,7 +9,11 @@ set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-Wshadow -Wall")
|
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-Wshadow -Wall")
|
||||||
|
|
||||||
add_compile_options(-fPIC)
|
# MSVC does not need -fPIC
|
||||||
|
if (NOT MSVC)
|
||||||
|
add_compile_options(-fPIC)
|
||||||
|
endif()
|
||||||
|
|
||||||
# MSVC needs this command option to really enable utf-8 output
|
# MSVC needs this command option to really enable utf-8 output
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
add_compile_options(/utf-8)
|
add_compile_options(/utf-8)
|
||||||
|
@ -19,9 +23,6 @@ if (APPLE)
|
||||||
add_compile_options(-mmacosx-version-min=10.15)
|
add_compile_options(-mmacosx-version-min=10.15)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# generate release executables
|
|
||||||
set(CMAKE_BUILD_TYPE "Release")
|
|
||||||
|
|
||||||
# build nasal used object
|
# build nasal used object
|
||||||
set(NASAL_OBJECT_SOURCE_FILE
|
set(NASAL_OBJECT_SOURCE_FILE
|
||||||
${CMAKE_SOURCE_DIR}/src/cli/cli.cpp
|
${CMAKE_SOURCE_DIR}/src/cli/cli.cpp
|
||||||
|
|
Loading…
Reference in New Issue