This commit is contained in:
@ -45,11 +45,6 @@ configure_file(
|
||||
# Set CMAKE_MODULE_PATH to include our custom find modules
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
# Auto-detect source files
|
||||
file(GLOB_RECURSE SOURCES "src/*.cpp")
|
||||
file(GLOB_RECURSE HEADERS "src/*.hpp")
|
||||
file(GLOB_RECURSE HEADERS "src/*.h")
|
||||
|
||||
# Add custom target to run cmake_prebuild.sh at the start of the build process
|
||||
add_custom_target(run_prebuild_script ALL
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Running cmake_prebuild.sh..."
|
||||
@ -57,6 +52,13 @@ add_custom_target(run_prebuild_script ALL
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
src/main.cpp
|
||||
)
|
||||
|
||||
# Mark sources as GENERATED to defer existence check until build time
|
||||
set_source_files_properties(${SOURCES} PROPERTIES GENERATED TRUE)
|
||||
|
||||
# Add executable
|
||||
add_executable(${PROJECT_EXE_NAME} ${SOURCES})
|
||||
add_dependencies(${PROJECT_EXE_NAME} run_prebuild_script)
|
||||
|
@ -6,6 +6,10 @@
|
||||
#include "httplib.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
void crashy() {
|
||||
ASSERT(false,"SUCCESS!");
|
||||
}
|
||||
|
||||
int main() {
|
||||
std::cout << "ipdemo version: " << ipdemo::VERSION << std::endl;
|
||||
std::cout << std::endl;
|
||||
@ -23,6 +27,8 @@ int main() {
|
||||
std::cout << j.dump(4) << std::endl;
|
||||
|
||||
std::cout << "Done" << std::endl;
|
||||
|
||||
|
||||
crashy();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user