16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 21:29:18 +02:00

fix stdafx cotire

This commit is contained in:
milek
2019-03-25 20:35:23 +00:00
parent 810ea151e2
commit 075d88e8d7
3 changed files with 8 additions and 15 deletions

View File

@@ -1,6 +1,5 @@
cmake_minimum_required(VERSION 3.0)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake_modules/")
#include(PrecompiledHeader)
include(cotire)
set(DEPS_DIR ${DEPS_DIR} "${CMAKE_SOURCE_DIR}/ref")
project("eu07")
@@ -165,11 +164,6 @@ endif()
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "stdafx.h")
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
cotire(${PROJECT_NAME})
#add_precompiled_header(${PROJECT_NAME} stdafx.h FORCEINCLUDE SOURCE_CXX stdafx.cpp)
if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
# /wd4996: disable "deprecation" warnings
# /wd4244: disable warnings for conversion with possible loss of data
@@ -198,8 +192,7 @@ include_directories(${OPENGL_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES})
find_package(GLEW REQUIRED)
include_directories(${GLEW_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${GLEW_LIBRARIES})
target_link_libraries(${PROJECT_NAME} GLEW::GLEW)
find_package(GLFW3 REQUIRED)
include_directories(${GLFW3_INCLUDE_DIR})
@@ -239,3 +232,7 @@ endif()
if (WIN32)
target_link_libraries(${PROJECT_NAME} ws2_32)
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "stdafx.h")
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
cotire(${PROJECT_NAME})

View File

@@ -154,7 +154,8 @@ void python_taskqueue::exit() {
m_condition.notify_all();
// let them free up their shit before we proceed
for( auto &worker : m_workers ) {
worker.join();
if (worker.joinable())
worker.join();
}
// get rid of the leftover tasks
// with the workers dead we don't have to worry about concurrent access anymore

View File

@@ -81,12 +81,7 @@
#define GLFW_DLL
#endif // _windows
#endif // build_static
#ifndef __ANDROID__
#include "GL/glew.h"
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif
#include <GL/glew.h>
#ifdef _WIN32
#include "GL/wglew.h"
#endif