this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fixed python rebuilding on every run

nesbox 68b94ee5 47a779dd

+11 -21
+11 -21
CMakeLists.txt
··· 408 408 find_package(Python3 COMPONENTS Interpreter) 409 409 endif() 410 410 411 - execute_process( 411 + add_custom_command( 412 + OUTPUT ${POCKETPY_DIR}/src/_generated.h 412 413 COMMAND ${Python3_EXECUTABLE} preprocess.py 413 414 WORKING_DIRECTORY ${POCKETPY_DIR} 414 - RESULT_VARIABLE EXIT_CODE 415 + DEPENDS ${POCKETPY_DIR}/preprocess.py 415 416 ) 416 417 417 - if(NOT ${EXIT_CODE} EQUAL 0) 418 - message(FATAL_ERROR "python3 prebuild failed!!") 419 - endif() 420 - 421 - add_library( 422 - python 423 - STATIC 418 + add_library(python STATIC 419 + ${POCKETPY_DIR}/src/_generated.h 424 420 ${POCKETPY_DIR}/c_bindings/pocketpy_c.cpp 425 421 ) 422 + 426 423 set_target_properties(python PROPERTIES LINKER_LANGUAGE CXX) 427 424 target_compile_definitions(python PRIVATE PK_ENABLE_OS=0) 428 - target_include_directories(python PRIVATE ${POCKETPY_DIR}/src) 429 - target_include_directories(python PUBLIC ${POCKETPY_DIR}/c_bindings) 425 + target_include_directories(python 426 + PRIVATE ${POCKETPY_DIR}/src 427 + PUBLIC ${POCKETPY_DIR}/c_bindings) 428 + 430 429 if (${CMAKE_VERSION} VERSION_LESS "3.8.0") 431 430 set_target_properties(python PROPERTIES COMPILE_FLAGS "--std=c++17") 432 431 else() 433 432 target_compile_features(python PRIVATE cxx_std_17) 434 433 endif() 435 - 436 - # the export.h normally lives in the src subdirecty file, but needs to be seen 437 - # by the c bindings 438 - add_custom_command( 439 - TARGET python PRE_BUILD 440 - COMMAND ${CMAKE_COMMAND} -E copy 441 - ${POCKETPY_DIR}/src/export.h 442 - ${POCKETPY_DIR}/c_bindings/export.h 443 - ) 444 - 445 434 446 435 ################################ 447 436 # GIFLIB ··· 566 555 PRIVATE 567 556 ${THIRDPARTY_DIR}/moonscript 568 557 ${THIRDPARTY_DIR}/fennel 558 + ${POCKETPY_DIR}/src 569 559 PUBLIC 570 560 ${CMAKE_SOURCE_DIR}/include 571 561 ${CMAKE_SOURCE_DIR}/src)