From c64eb8214e60976ed542480f9c231fd4bd5344b5 Mon Sep 17 00:00:00 2001 From: Manuel Drehwald Date: Wed, 17 Jan 2024 16:53:05 -0500 Subject: [PATCH] make fpic work on windows --- enzyme/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/enzyme/CMakeLists.txt b/enzyme/CMakeLists.txt index da45a63b4319..13a9b4973c54 100644 --- a/enzyme/CMakeLists.txt +++ b/enzyme/CMakeLists.txt @@ -13,7 +13,8 @@ add_definitions(-DENZYME_VERSION_MAJOR=${ENZYME_MAJOR_VERSION}) add_definitions(-DENZYME_VERSION_MINOR=${ENZYME_MINOR_VERSION}) add_definitions(-DENZYME_VERSION_PATCH=${ENZYME_PATCH_VERSION}) -SET(CMAKE_CXX_FLAGS "-Wall -fPIC -fno-rtti ${CMAKE_CXX_FLAGS} -Werror=unused-variable -Werror=dangling-else") +set(CMAKE_POSITION_INDEPENDENT_CODE ON) +SET(CMAKE_CXX_FLAGS "-Wall -fno-rtti ${CMAKE_CXX_FLAGS} -Werror=unused-variable -Werror=dangling-else") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -ggdb") SET(CMAKE_CXX_FLAGS_RELEASE "-O2")