Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
########################################################
#######################################################
# cmake file for building CED
# @author Jan Engels, Desy IT
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
Expand Down Expand Up @@ -123,12 +123,16 @@ IF( CED_SERVER )

INSTALL( TARGETS glced DESTINATION bin )

# Install dll in bin directory in the case of CYGWIN
IF( CYGWIN )
INSTALL( TARGETS CED DESTINATION bin )
ENDIF()

ENDIF( CED_SERVER )


# ------------------ CED TESTS ------------------
#FOREACH( _testname test_ced test_ced_mhits test_ced_color )
FOREACH( _testname test_ced test_ced_mhits )
FOREACH( _testname test_ced test_ced_mhits test_ced_color )

IF( BUILD_TESTING )
ADD_EXECUTABLE( ${_testname} ./src/tests/${_testname}.cc )
Expand Down
4 changes: 4 additions & 0 deletions src/client/glut_socks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ static void tcp_server_accept(struct __glutSocketList *list){
int fd;
tcp_srv_sock *nl;
struct sockaddr_in myclient;
#if defined(__CYGWIN__)
socklen_t size=sizeof(myclient);
#else
unsigned int size=sizeof(myclient);
#endif
;


Expand Down
4 changes: 3 additions & 1 deletion src/server/ced_srv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@

#define PORT 0x1234
#define PI 3.14159265358979323846f

#if defined(__CYGWIN__)
#define M_PI 3.14159265358979323846f
#endif

//hauke
//int graphic[3];
Expand Down
3 changes: 3 additions & 0 deletions src/server/glced.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ static GLfloat window_width=0.;
static GLfloat window_height=0.;

#include <ced_menu.h>
#if defined(__CYGWIN__)
#define M_PI 3.14159265358979323846f
#endif


#define DEFAULT_WORLD_SIZE 1000. //SJA:FIXED Reduce world size to give better scale
Expand Down
14 changes: 13 additions & 1 deletion src/tests/test_ced.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include <ced_cli.h>
#include <math.h>
#if defined(__CYGWIN__)
#define M_SQRT2 1.4142135623730950
#endif
#include <stdio.h>

double length = 100;

Expand All @@ -17,7 +21,15 @@ int main(){

/*
* Initialisation */
ced_client_init("localhost",7286);
char *p;
p = getenv("CED_PORT");
if(p != NULL){
printf("Try to use user defined port %s.\n", p);
ced_client_init("localhost",atoi(p));
}else{
printf("CED_PORT undefined. Using CED_PORT=7286.\n");
ced_client_init("localhost",7286);
}
ced_register_elements();

/*
Expand Down
13 changes: 12 additions & 1 deletion src/tests/test_ced_color.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <ced_cli.h>
#include <math.h>
#include <iostream>
#include <stdlib.h>
#include <stdio.h>

double length = 5;

Expand All @@ -18,7 +20,16 @@ int main(){

/*
* Initialisation */
ced_client_init("localhost",20131);
char *p;
p = getenv("CED_PORT");
if(p != NULL){
printf("Try to use user defined port %s.\n", p);
ced_client_init("localhost",atoi(p));
}else{
printf("CED_PORT undefined. Using CED_PORT=7286.\n");
ced_client_init("localhost",7286);
}

ced_register_elements();

/*
Expand Down
10 changes: 9 additions & 1 deletion src/tests/test_ced_mhits.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ int main(){

/*
* Initialisation */
ced_client_init("localhost",7286);
char *p;
p = getenv("CED_PORT");
if(p != NULL){
printf("Try to use user defined port %s.\n", p);
ced_client_init("localhost",atoi(p));
}else{
printf("CED_PORT undefined. Using CED_PORT=7286.\n");
ced_client_init("localhost",7286);
}
ced_register_elements();

time_t t;
Expand Down