From 04d60edca5277dc3b9be35ee7d3bbcfc0d26e35a Mon Sep 17 00:00:00 2001 From: Manuel Drehwald Date: Wed, 17 Jan 2024 17:28:25 -0500 Subject: [PATCH] make fpic work on windows (#1614) --- 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")