mirror of
https://github.com/triqs/dft_tools
synced 2024-12-25 22:03:43 +01:00
cmake : fix a detail in __init__ generation
should use .python/__init_... to create the file. not python, otherwise when compiling application *in source* (like brew does) this is a mess...
This commit is contained in:
parent
cbea003f9f
commit
f04b0b1058
@ -80,6 +80,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
if (CMAKE_COMPILER_IS_CLANG)
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ ")
|
||||
MESSAGE(STATUS "Adding compilation flags -stdlib=libc++ ")
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-writable-strings ")
|
||||
else (CMAKE_COMPILER_IS_CLANG)
|
||||
MESSAGE( WARNING "${line_of_star}You are on Os X but your are not using clang. This is NOT recommended...${line_of_star}")
|
||||
endif (CMAKE_COMPILER_IS_CLANG)
|
||||
|
@ -136,13 +136,13 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E chdir ${TRIQS_PATH}/${TRIQS_PYTHON_L
|
||||
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/pytriqs/${python_destination})
|
||||
|
||||
# Copy and install __init__.py files
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/python/__init__.py "__all__=[]")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/.python/__init__.py "__all__=[]")
|
||||
set(partial_dir ${python_destination})
|
||||
while(partial_dir MATCHES "/")
|
||||
string(REGEX REPLACE "/[^/]*$" "" partial_dir ${partial_dir})
|
||||
if(NOT EXISTS ${CMAKE_BINARY_DIR}/pytriqs/${partial_dir}/__init__.py)
|
||||
execute_process(COMMAND cp ${CMAKE_BINARY_DIR}/python/__init__.py ${CMAKE_BINARY_DIR}/pytriqs/${partial_dir})
|
||||
install(FILES ${CMAKE_BINARY_DIR}/python/__init__.py DESTINATION ${TRIQS_PYTHON_LIB_DEST}/${partial_dir})
|
||||
execute_process(COMMAND cp ${CMAKE_BINARY_DIR}/.python/__init__.py ${CMAKE_BINARY_DIR}/pytriqs/${partial_dir})
|
||||
install(FILES ${CMAKE_BINARY_DIR}/.python/__init__.py DESTINATION ${TRIQS_PYTHON_LIB_DEST}/${partial_dir})
|
||||
endif(NOT EXISTS ${CMAKE_BINARY_DIR}/pytriqs/${partial_dir}/__init__.py)
|
||||
endwhile(partial_dir MATCHES "/")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user