Commit 6fcec69c authored by Elias Leinenweber's avatar Elias Leinenweber
Browse files

Destructeur virtuel et flags de compilation

parent e00bb6a2
......@@ -7,6 +7,7 @@ project(HeadmasterSimulator
LANGUAGES CXX)
# specify the C++ standard
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
......
@ECHO off
SETLOCAL enabledelayedexpansion
COLOR B
REM CHECK ADMIN MODE
net session >NUL 2>&1
IF NOT %errorLevel% == 0 (
REM REQUEST ADMIN MODE IF NEEDED
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
)
REM SET GLOBALS
FOR /F "tokens=* USEBACKQ" %%F IN (`where cmake`) DO SET CMAKEPATH=%%F
CD /D %~dp0
SET ROOT=%cd%
SET LIBPATH=%cd%\..\deps\glfw
FOR /F "usebackq tokens=*" %%i IN (`vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe`) DO SET VSPATH=%%i
REM CHECK VS AND CMAKE PATHS
IF NOT DEFINED VSPATH (
COLOR 4
ECHO "failed to locate msbuild tools."
PAUSE
EXIT 2
)
IF NOT DEFINED CMAKEPATH (
COLOR 4
echo "failed to locate cmake. Please set cmake path in environment variable."
PAUSE
EXIT 3
)
REM //BUILDING//
REM BUILD LIB
echo Building shapelib
mkdir %LIBPATH%\build > NUL 2>&1
CD %LIBPATH%\build
echo building shapelib x64...
cmake -G "Visual Studio 16 2019" -A x64 %LIBPATH%
IF NOT %errorLevel% == 0 ECHO failed to generate vs files for shapelib.
echo compiling shapelib for Release x64...
"%VSPATH%" shp.vcxproj /t:build /p:Configuration="Release" /p:Platform="x64" /p:BuildInParallel=true /p:OutDir=%LIBPATH%\build\Release
IF NOT %errorLevel% == 0 ECHO failed to compile shapelib.
echo compiling shapelib for Debug x64...
"%VSPATH%" shp.vcxproj /t:build /p:Configuration="Debug" /p:Platform="x64" /p:BuildInParallel=true /p:OutDir=%LIBPATH%\build\Debug
IF NOT %errorLevel% == 0 ECHO failed to compile shapelib.
......@@ -5,6 +5,7 @@
class Component
{
public:
virtual ~Component() {};
virtual void render() const = 0;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment